package com.jd.service.impl.sercice.impl;

import com.jd.domain.Emp;
import com.jd.mapper.EmpMapper;
import com.jd.service.impl.sercice.IEmpService;
import com.jd.util.MybatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class EmpServiceImpl implements IEmpService {


    @Override
    public List<Emp> findAllEmpAndDept() {
        SqlSession sqlSession = MybatisUtils.openSession();
        EmpMapper mapper = sqlSession.getMapper(EmpMapper.class);
        List<Emp> allEmpAndDept = mapper.findAllEmpAndDept();
        return allEmpAndDept;
    }
}
